import shu.Booklist;
import yonghu.gly;
import yonghu.jsr;
import yonghu.user;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 18128
 * Date: 2023-09-24
 * Time: 12:29
 */
public class main {
    public static user denglu()
    {
        System.out.println("请输入你的名字");
        Scanner scan=new Scanner(System.in);
        String s=scan.next();

        System.out.println("请输入你的身份1.管理员2.借阅人");
        int id=scan.nextInt();
        if(id==1)
        {
            user u=new gly(s);
            return u;
        }
        else if (id==2)
        {
            user u=new jsr(s);
            return u;
        }
        else//输入错误返回空
        {
            return null;
        }
    }
    public static void main(String[] args) {
        Booklist booklist=new Booklist();
        user ret=denglu();
        while(true)
        {
            int rrr=ret.xxx();
            ret.docz(rrr,booklist);
        }
    }
}
